import './App.scss';
import React, { Component,lazy,Suspense } from 'react'
import Home from './views/Home/Index'
import {Switch,Route,Redirect} from 'react-router-dom'
import Loading from './components/common/Loading'



export default class App extends Component {
  render() {
    return (
      <div id="app">
        <Suspense fallback={<Loading/>}>
          <Switch>
            <Route  path="/home" component={Home}></Route>
            <Route  path="/admin" component={lazy(()=>import('./views/Admin/Admin'))}></Route>
            <Redirect to="/home"/>
          </Switch>
        </Suspense>
       
      </div>
    )
  }
}
